<?php
	require_once('inc_admin.php');
?>
        <!--PAGE CONTENT -->
        <div id="content">

            <div class="inner" style="min-height:1200px;">
                <div class="row">
                    <div class="col-xs-12">
					

                          
<?php
//为upoladadmin赋值
session_start();
$cid=$_SESSION["cid"];
connect();
$sql0="select * from comments";
$result0=mysql_query($sql0);
$row=mysql_fetch_assoc($result0);
//$row是一个索引数组
$uploadadmin=$row["cid"];

//取表单元素的值
$content=$_POST["content"];
$cdate=$_POST["cdate"];
$uid=$_POST["uid"];
$vid=$_POST["vid"];

//$pic="myimage.jpg";
//处理文件上传





//将注册用户信息写入后天数据库的users表



$pic=$randname.".".$hz;




$sql="insert into comments values(null,'$cid',$content,'$cdate','$uid',now(),$uploadadmin,0,0,'$address')";
echo $sql;
//执行sql语句。
$num=mysql_query($sql);
if ($num==1) {
    echo "留言添加成功成功! 3秒返回";
    header("refresh:3;url='videoAdd.php'");
}else{

    echo"留言添加失败！";
}




?> 




                    </div>
                </div>
                <hr />
            </div>
        </div>
       <!--END PAGE CONTENT -->
<?php 
require_once('footer.php');
?>












